<template>

</template>

<script lang="ts">
import {LubanCommonUtils} from '@/common/luban-common-utils'
import {OrderTypeDict} from '@/biz-common/order-type-dict'
interface RedirectPageModel{
  taskId: string;//任务ID
  orderTypeCode: string;//单据类型编码
}
// http://10.254.193.200:8080/pages/common/redirect?taskId=123&orderTypeCode=Project
export default {
  mounted() {
    let params = LubanCommonUtils.getURLParams() as RedirectPageModel;
    switch (params.orderTypeCode){
      case OrderTypeDict.CRFQ.Project.code:
        uni.reLaunch ({
          url:`${OrderTypeDict.CRFQ.Project.router}?taskId=${params.taskId}`
        });
        break;
      case OrderTypeDict.CRFQ.Document.code:
        uni.reLaunch ({
          url:`${OrderTypeDict.CRFQ.Project.router}?taskId=${params.taskId}`
        });
        break;
      default:
        uni.reLaunch ({
          url:`/pages/common/404`
        });
        break;
    }
  }
}
</script>

<style scoped>

</style>
